package main
import "fmt"

func printValue_anyType(v interface{}){
	switch v := v.(type){
	case int:
		fmt.Println("int",v)
	case string:
		fmt.Println("string",v)
	case bool:
		fmt.Println("bool",v)
	case float64:
		fmt.Println("float64",v)
	default:
		fmt.Println("unknown type")
	}

}

type Book struct{
	title string
	author string
}

func main() {
    printValue_anyType(10)
    printValue_anyType("hello")
    printValue_anyType(true)
    printValue_anyType(3.14)
	printValue_anyType([]int{1,2,3})
    printValue_anyType(Book{"Go语言编程", "LiuJiang"})
}

/* 
int 10
string hello
bool true
float64 3.14
unknown type
unknown type

*/